<template>
	<view class="page index">
		<view class="header">
			<view class="tab-list">
				<view :class="['tab-item', tabIndex == index && 'tab-select']" v-for="(item, index) in tabList" :key="index" @click="tabIndex = index">
					{{item}}
				</view>
			</view>
			<view class="all">
				全部已读
			</view>
		</view>
		<view class="main">
			<scroll-view class="scroll" scroll-y="true" @scrolltolower="scrollLower" :enhanced="true" :show-scrollbar="false">
				<view class="container">
					<view class="list" v-for="item in 3" :key="item">
						<view class="item">
							<view class="left">
								<view class="status">
									XXXXXXX审批已通过
								</view>
								<view class="time">
									2024-05-23 11:22:32
								</view>
							</view>
							<view class="right">
								设为已读
							</view>
						</view>
					</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	import commonSearch from "@/components/commonSearch.vue"
	export default {
		components: {
			commonSearch
		},
		data() {
			return {
				keyWord: '',
				showMore:false,
				tabIndex: 0,
				tabList: ['未读', '已读'],
			}
		},
		methods: {
			//关键字
			input(e) {
				console.log(e, this.keyWord, '================')
			},
		}
	}
</script>

<style lang="scss" scoped>
	@import "@/common/style/customicons.scss";

	.index {
		@include flex-c;
		>.header{
			padding: 18rpx 30rpx 0;
			flex: 0 0 auto;
			@include flex-r-between-start;
			.tab-list{
				flex: 0 0 auto;
				@include flex-r;
				.tab-item{
					color: #101010;
					font-size: 28rpx;
					text-align: center;
					padding-right: 40rpx;
					&::after{
						content: '';
						display: block;
						width: 60rpx;
						height: 6rpx;
						border-radius: 10rpx;
						background-color: transparent;
						margin-top: 10rpx;
					}
					&.tab-select{
						color: #1684fc;
						&::after{
							background-color: #1684fc;
						}
					}
				}
			}
			.all{
				font-size: 28rpx;
				color: #4095E5;
			}
		}
		.main {
			flex: 1 0 0;
			overflow: hidden;
			.scroll{
				height: 100%;
				.container{
					padding: 24rpx 28rpx;
					.list{
						padding: 0 0 18rpx;
						.item{
							padding: 28rpx;
							@include box;
							@include flex-r-between-center;
							.left{
								.status{
									color: #101010;
									font-size: 28rpx;
									padding: 0 0 12rpx;
								}
								.time{
									color: #9A9A9A;
									font-size: 24rpx;
								}
							}
							.right{
								color: #4095E5;
								font-size: 28rpx;
							}
						}
					}
				}
			}

			&::-webkit-scrollbar {
				display: none;
			}
		}
	}
</style>